﻿using EntityModels.E09.Files;
using IRepositories;
using ORM;

namespace Repositories
{
    public class FilePathRepository : IFilePathRepository
    {
        private readonly PSPDbContext context;

        public FilePathRepository(PSPDbContext context)
        {
            this.context = context;
        }

        public async Task<FilePath> CreateAsync(FilePath file)
        {
            await context.FilePaths.AddAsync(file);
            await context.SaveChangesAsync();
            return file;
        }

        public async Task<FilePath> FindAsync(Guid id)
        {
            return await context.FilePaths.FindAsync(id);
        }


    }
}
